Avoid the "Your Gemfile lists the gem tzinfo-data more than once." warning.

Akinori MUSHA 11 years ago
parent
commit
05ca6c164b
1 changed files with 8 additions and 4 deletions
  1. 8 4
      Gemfile

+ 8 - 4
Gemfile

@@ -4,10 +4,14 @@ gem 'protected_attributes', '~>1.0.7'
4 4
 
5 5
 gem 'rails', '4.1.0'
6 6
 
7
-# Windows does not include zoneinfo files, so bundle the tzinfo-data gem
8
-gem 'tzinfo-data', platforms: [:mingw, :mswin, :x64_mingw]
9
-# Seems FreeBSD's zoneinfo is not exactly what tzinfo expects
10
-gem 'tzinfo-data' if /freebsd/i === RUBY_PLATFORM
7
+case RUBY_PLATFORM
8
+when /freebsd/i
9
+  # Seems FreeBSD's zoneinfo is not exactly what tzinfo expects
10
+  gem 'tzinfo-data'
11
+else
12
+  # Windows does not include zoneinfo files, so bundle the tzinfo-data gem
13
+  gem 'tzinfo-data', platforms: [:mingw, :mswin, :x64_mingw]
14
+end
11 15
 
12 16
 gem 'mysql2', '~> 0.3.15'
13 17
 gem 'devise', '~> 3.2.4'